home *** CD-ROM | disk | FTP | other *** search
/ Mac Cube 4: Multimedia Applications / MacCube Volume 4: Multimedia Applications.iso / Graphics / NIH Image Folder / Macros / Stacks < prev    next >
Text File  |  1993-06-08  |  15KB  |  717 lines

  1. {This file contains macros that work with stacks.}
  2.  
  3.  
  4. procedure CheckForStack;
  5. begin
  6.   if nPics=0 then begin
  7.     PutMessage('This macro requires a stack.');
  8.     exit;
  9.   end;
  10.   if nSlices=0 then begin
  11.     PutMessage('This window is not a stack.');
  12.     exit;
  13.   end;
  14. end;
  15.  
  16.  
  17. macro 'Add Slice [A]';    begin CheckForStack; AddSlice end;
  18. macro 'Delete Slice [D]'; begin CheckForStack; DeleteSlice end;
  19. macro 'First Slice [F]';  begin CheckForStack; SelectSlice(1) end;
  20. macro 'Last Slice [L]';   begin CheckForStack; SelectSlice(nSlices) end;
  21.  
  22. macro 'Select Slice… [S]';
  23. var
  24.   n:integer;
  25. begin
  26.  CheckForStack;
  27.  n:=GetNumber('Slice Number:',trunc(nSlices/2));
  28.  SelectSlice(n)
  29. end;
  30.  
  31.  
  32. macro '(-' begin end;
  33.  
  34. macro 'Smooth';
  35. var
  36.   i:integer;
  37. begin
  38.   CheckForStack;
  39.   for i:= 1 to nSlices do begin
  40.     SelectSlice(i);
  41.     SetOption; Smooth;
  42.   end;
  43. end;
  44.  
  45.  
  46. macro 'Sharpen';
  47. var
  48.   i:integer;
  49. begin
  50.   CheckForStack;
  51.   for i:= 1 to nSlices do begin
  52.     SelectSlice(i);
  53.     SetOption; Smooth;
  54.     SetOption; Sharpen;
  55.   end;
  56. end;
  57.  
  58.  
  59. macro 'Reduce Noise';
  60. var
  61.   i:integer;
  62. begin
  63.   CheckForStack;
  64.   for i:= 1 to nSlices do begin
  65.     SelectSlice(i);
  66.     ReduceNoise;
  67.   end;
  68. end;
  69.  
  70.  
  71. macro 'Apply LUT';
  72. var
  73.   i,stack,slices:integer;
  74. begin
  75.   CheckForStack;
  76.   stack:=PicNumber;
  77.   slices:=nSlices;
  78.   Duplicate('Temp');
  79.   for i:= 1 to slices do begin
  80.     SelectPic(stack);
  81.     SelectSlice(i);
  82.     ApplyLut;
  83.     SelectPic(nPics);
  84.     if i<>slices then PropagateLut;
  85.   end;
  86.   SelectPic(nPics);
  87.   Dispose;
  88. end;
  89.  
  90.  
  91. macro 'Remove 0 and 255';
  92. {
  93. Changes 0 to 1 and 255 to 254 in all slices. We want to do this because
  94. pixel values of 0(which always displays as white) and 255(always
  95. displays as black) cause problems when pseudo-coloring images.
  96. }
  97. var
  98.   i:integer;
  99. begin
  100.   CheckForStack;
  101.   for i:= 1 to nSlices do begin
  102.     SelectSlice(i);
  103.     ChangeValues(0,0,1);
  104.     ChangeValues(255,255,254);
  105.   end;
  106. end;
  107.  
  108.  
  109. macro '(-' begin end;
  110.  
  111.  
  112. procedure CheckForSelection;
  113. var 
  114.   x1,y1,x2,y2,LineWidth:integer;
  115. begin
  116.   GetRoi(RoiLeft,RoiTop,RoiWidth,RoiHeight);
  117.   GetLine(x1,y1,x2,y2,LineWidth);
  118.   if (RoiWidth=0) or (x1>=0) then begin
  119.     PutMessage('Please make a rectangular selection.');
  120.     exit;
  121.   end;
  122. end;
  123.  
  124.  
  125. procedure CropAndScale(fast:boolean; angle:real);
  126. var
  127.   i,OldStack,NewStack:integer;
  128.   RoiLeft,RoiTop,RoiWidth,RoiHeight:integer;
  129.   N,NewWidth:integer;
  130.   ScaleFactor:real;
  131.   OneToOne:boolean;
  132. begin
  133.   CheckForStack;
  134.   CheckForSelection;
  135.   SaveState;
  136.   OldStack:=PicNumber;
  137.   N:=nSlices;
  138.   ScaleFactor:=GetNumber('Scale factor(0.05..25):',1.0);
  139.   OneToOne:=ScaleFactor=1.0;
  140.   NewWidth:=round(RoiWidth*ScaleFactor);
  141.   if odd(NewWidth) then begin
  142.     NewWidth:=NewWidth-1;
  143.     ScaleFactor:=NewWidth/RoiWidth;
  144.   end;
  145.   SetNewSize(RoiWidth*ScaleFactor,RoiHeight*ScaleFactor);
  146.   MakeNewStack('Stack');
  147.   NewStack:=PicNumber;
  148.   if not OneToOne then begin
  149.     if fast 
  150.       then SetScaling('Nearest; Create New Window')
  151.       else SetScaling('Bilinear; Create New Window');
  152.   end;
  153.   SelectPic(OldStack);
  154.   for i:= 1 to N do begin
  155.     SelectSlice(1);
  156.     if OneToOne and (angle=0.0) then Duplicate('Temp')
  157.       else ScaleAndRotate(ScaleFactor,ScaleFactor,angle);
  158.     SelectAll;
  159.     Copy;
  160.     SelectPic(NewStack);
  161.     if i<>1 then AddSlice;
  162.     Paste;
  163.     SelectPic(nPics);
  164.     Dispose; {Temp}
  165.     SelectPic(OldStack);
  166.     DeleteSlice;
  167.   end;
  168.   Dispose; {OldStack}
  169.   RestoreState;
  170. end;
  171.  
  172. macro 'Crop and Scale-Fast…';   begin CropAndScale(true, 0); end;
  173. macro 'Crop and Scale-Smooth…'; begin CropAndScale(false, 0); end;
  174.  
  175. procedure Rotate(left:boolean);
  176. var
  177.   i,OldStack,NewStack:integer;
  178.   RoiLeft,RoiTop,RoiWidth,RoiHeight:integer;
  179.   N,NewWidth:integer;
  180.   ScaleFactor,SliceSpacing:real;
  181.   OneToOne:boolean;
  182. begin
  183.   CheckForStack;
  184.   SelectAll;
  185.   GetRoi(RoiLeft,RoiTop,RoiWidth,RoiHeight);
  186.   OldStack:=PicNumber;
  187.   SliceSpacing:=GetSliceSpacing;
  188.   N:=nSlices;
  189.   SetNewSize(RoiHeight,RoiWidth);
  190.   MakeNewStack('Stack');
  191.   if SliceSpacing>0 then SetSliceSpacing(SliceSpacing);
  192.   NewStack:=PicNumber;
  193.   SelectPic(OldStack);
  194.   for i:= 1 to N do begin
  195.     SelectSlice(1);
  196.     if left
  197.       then RotateLeft(true)
  198.       else RotateRight(true);
  199.     SelectAll;
  200.     Copy;
  201.     SelectPic(NewStack);
  202.     if i<>1 then AddSlice;
  203.     Paste;
  204.     ChoosePic(nPics);
  205.     Dispose;
  206.     SelectPic(OldStack);
  207.     DeleteSlice;
  208.   end;
  209.   Dispose;
  210. end;
  211.  
  212.  
  213. macro 'Rotate Left';  begin rotate(true) end;
  214. macro 'Rotate Right'; begin rotate(false) end;
  215.  
  216.  
  217. macro 'Rotate…';
  218. var
  219.   angle:real;
  220. begin
  221.   angle:=GetNumber('Angle(-180.0°..180.0°):',45.0);
  222.   CropAndScale(false, angle);
  223. end;
  224.  
  225.  
  226. macro 'Invert';
  227. var
  228.   i:integer;
  229. begin
  230.   CheckForStack;
  231.   for i:= 1 to nSlices do begin
  232.     SelectSlice(i);
  233.     Invert;
  234.   end;
  235. end;
  236.  
  237.  
  238. procedure flip(vertical:boolean);
  239. var
  240.   i:integer;
  241.   SliceSpacing:real;
  242. begin
  243.   CheckForStack;
  244.   for i:= 1 to nSlices do begin
  245.     SelectSlice(i);
  246.     if vertical
  247.       then FlipVertical
  248.       else FlipHorizontal;
  249.   end;
  250. end;
  251.  
  252. macro 'Flip Vertical';   begin flip(true) end;
  253. macro 'Flip Horizontal'; begin flip(false) end;
  254.  
  255.  
  256. macro 'Delete Even Slices';
  257. var
  258.   n:integer;
  259. begin
  260.   CheckForStack;
  261.   SelectSlice(2);
  262.   repeat
  263.     DeleteSlice;
  264.     n:=SliceNumber;
  265.     n:=n+2;
  266.     if n>nSlices then exit;
  267.     SelectSlice(n);
  268.    until false;
  269. end;
  270.  
  271.  
  272. macro 'Replicate Slices…';
  273. var
  274.   n,i,RepFactor:integer;
  275. begin
  276.   CheckForStack;
  277.   RepFactor:=GetNumber('Replication factor(2,3,4,5,etc):',2);
  278.   n:=nSlices;
  279.   repeat
  280.     SelectSlice(n);
  281.     SelectAll;
  282.     Copy;
  283.     for i:=2 to RepFactor do begin
  284.       AddSlice;
  285.       Paste;
  286.     end;
  287.     n:=n-1;
  288.    until n=0;
  289.    KillRoi;
  290. end;
  291.  
  292.  
  293. macro 'Merge Two Stacks';
  294. {
  295. Combines two stacks(w1xh1xd1 and w2xh2xd2) to create a new
  296. w1+w2 x max(h1,h2) x max(d1,d2) stack. For example, a 256x256x40
  297. and a 256x256x30 stack would be combined into one 512x256x40 stack.
  298. }
  299. var
  300.   i,w1,w2,w3,h1,h2,h3,d1,d2,d3:integer;
  301. begin
  302.   SaveState;
  303.   if nPics<>2 then begin
  304.     PutMessage('This macro operates on exactly two stacks.');
  305.     exit;
  306.   end;
  307.   SelectPic(1);
  308.   GetPicSize(w1,h1);
  309.   d1:=nSlices;
  310.   SelectPic(2);
  311.   GetPicSize(w2,h2);
  312.   d2:=nSlices;
  313.   if d1>=d2
  314.     then d3:=d1
  315.     else d3:=d2;
  316.   if d3=0 then begin
  317.     PutMessage('Both images must be stacks.');
  318.     exit;
  319.   end;
  320.   w3:=w1+w2;
  321.   if h1>=h2
  322.     then h3:=h1
  323.     else h3:=h2;
  324.   SetNewSize(w3,h3);
  325.   MakeNewStack('Merged');
  326.   for i:=1 to d3 do begin
  327.     SelectPic(1);
  328.     SelectSlice(1);
  329.     SelectAll;
  330.     Copy;
  331.     DeleteSlice;
  332.     SelectPic(3);
  333.     MakeRoi(0,0,w1,h1);
  334.     Paste;
  335.     SelectPic(2);
  336.     SelectSlice(1);
  337.     SelectAll;
  338.     Copy;
  339.     DeleteSlice;
  340.     SelectPic(3);
  341.     MakeRoi(w1,0,w2,h2);
  342.     Paste;
  343.     if i<d3 then AddSlice;
  344.   end;
  345.   SelectPic(1);
  346.   Dispose;
  347.   SelectPic(1);
  348.   Dispose;
  349.   RestoreState;
  350. end;
  351.  
  352.  
  353. macro 'Average Two Stacks';
  354. {Creates the frame by frame average of two stacks.}
  355. var
  356.   i,w1,w2,w3,h1,h2,h3,d1,d2,d3:integer;
  357. begin
  358.   SaveState;
  359.   if nPics<>2 then begin
  360.     PutMessage('This macro operates on exactly two stacks.');
  361.     exit;
  362.   end;
  363.   SelectPic(1);
  364.   GetPicSize(w1,h1);
  365.   d1:=nSlices;
  366.   SelectPic(2);
  367.   GetPicSize(w2,h2);
  368.   d2:=nSlices;
  369.   if d1>=d2
  370.     then d3:=d1
  371.     else d3:=d2;
  372.   if (w1<>w2) or (h1<>h2) or (d1<>d2) or (d1=0)  then begin
  373.     PutMessage('This macro requires two stacks that are the same size.');
  374.     exit;
  375.   end;
  376.   ScaleMath(false);
  377.   for i:=1 to d1 do begin
  378.     SelectPic(1);
  379.     SelectSlice(i);
  380.     SelectAll;
  381.     MultiplyByConstant(0.5);
  382.     SelectPic(2);
  383.     SelectSlice(i);
  384.     SelectAll;
  385.     MultiplyByConstant(0.5);
  386.     SelectAll;
  387.     Copy;
  388.     SelectPic(1);
  389.     SelectSlice(i);
  390.     Paste;
  391.     Add;
  392.   end;
  393.   SelectPic(2);
  394.   Dispose;
  395.   RestoreState;
  396. end;
  397.  
  398.  
  399. macro '(-' begin end;
  400.  
  401.  
  402. macro 'Save Slices as files…';
  403. {
  404. This macro saves the slices in a stack as individual TIFF or PICT files using
  405. names of the form needed by Apple's Convert to [QuickTime]Movie utility.
  406. To specify the file type, checked either TIFF or PICT in the SaveAs dialog
  407. box, which should only appear once.
  408. }
  409. var
  410.   i,stack:integer;
  411. begin
  412.   CheckForStack;
  413.   stack:=PicNumber;
  414.   for i:= 1 to nSlices do begin
  415.     SelectPic(stack);
  416.     SelectSlice(i);
  417.     Duplicate('Frame.',i:2);
  418.     SaveAs;
  419.     {Export;}
  420.     Dispose;
  421.   end;
  422. end;
  423.  
  424.  
  425. macro 'Windows to Stack';
  426. {Unlike the menu command of the same name, the windows do not}
  427. {all need to be the same size.}
  428. var
  429.   i,width,height,MinWidth,MinHeight,n,stack:integer;
  430.   isStack:boolean;
  431. begin
  432.   if nPics<=1 then begin
  433.     PutMessage('At least two images must be open.');
  434.     exit;
  435.   end;
  436.   MinWidth:=9999;
  437.   MinHeight:=9999;
  438.   isStack:=false;
  439.   for i:=1 to nPics do begin
  440.     SelectPic(i);
  441.     GetPicSize(width,height);
  442.     if width<MinWidth then MinWidth:=width;
  443.     if height<MinHeight then MinHeight:=height;
  444.     isStack:=isStack or (nSlices>0);
  445.   end;
  446.   if isStack then begin
  447.     PutMessage('This macro does not work with stacks.');
  448.     exit;
  449.   end;
  450.   if odd(MinWidth) then MinWidth:=MinWidth-1;
  451.   n:=nPics;
  452.   SaveState;
  453.   SetNewSize(MinWidth,MinHeight);
  454.   MakeNewStack('Stack');
  455.   stack:=nPics;
  456.   for i:=1 to n do begin
  457.     SelectPic(1);
  458.     MakeRoi(0,0,MinWidth,MinHeight);
  459.     copy;;
  460.     Dispose;
  461.     SelectPic(nPics);
  462.     paste;
  463.     if i<>n then AddSlice;
  464.   end;
  465.   KillRoi;
  466.   RestoreState;
  467. end;
  468.  
  469.  
  470. Macro 'Stack to Windows'
  471. var
  472.   mystack,i:integer
  473.   width,height:integer;
  474. begin
  475.   SaveState;
  476.   CheckForStack;
  477.   GetPicSize(width,height);
  478.   SetNewSize(width,height);
  479.   mystack := picnumber;
  480.   for i:=1 to nslices do begin
  481.     SelectSlice(i);
  482.     SelectAll;
  483.     copy;
  484.     MakeNewWindow(i);
  485.     paste;
  486.     SelectPic(myStack);
  487.   end;
  488.   KillRoi;
  489.   RestoreState;
  490. end;
  491.  
  492.  
  493. macro 'Make Cone';
  494. var
  495.   i,size,margin,MaxRadius,r,r2,center,length,color,temp:integer;
  496. begin
  497.   size:=64;
  498.   margin:=5;
  499.   color:=100;
  500.   SaveState;
  501.   SetBackgroundColor(255); {Black}
  502.   SetNewSize(size,size);
  503.   MakeNewWindow('Temp'); {Work-around for bug fixed in V1.42}
  504.   temp:=nPics;
  505.   MakeNewStack('Cone');
  506.   for i:=1 to margin do AddSlice;
  507.   MaxRadius:=(size-2*margin)/2;
  508.   center:=size div 2;
  509.   length:=size-2*margin-1;
  510.   for i:=1 to length do begin
  511.     AddSlice;
  512.     r:=MaxRadius*(i/length);
  513.     MakeOvalRoi(center-r,center-r,r*2,r*2);
  514.     SetForegroundColor(color);
  515.     Fill;
  516.     if (i>length/2) and (i<(length-margin)) then begin
  517.       r2:=MaxRadius/6;
  518.       MakeOvalRoi(center-2.125*r2,center-1.3*r2,r2*2,r2*2);
  519.       SetForegroundColor(color-25);
  520.       Fill;
  521.       MakeOvalRoi(center+0.625*r2,center-0.7*r2,r2*2,r2*2);
  522.       SetForegroundColor(color+25);
  523.       Fill;
  524.     end;
  525.   end;
  526.   for i:=1 to margin do AddSlice;
  527.   KillRoi;
  528.   SelectPic(temp);
  529.   Dispose;
  530.   RestoreState;
  531. end;
  532.  
  533.  
  534. macro 'Animate';
  535. var
  536.   i:integer;
  537. begin
  538.   CheckForStack;
  539.   i:=0;
  540.   repeat
  541.     i:=i+1;
  542.     if i>nSlices then i:=1;
  543.     SelectSlice(i);
  544.   until button;
  545. end;
  546.  
  547.  
  548. procedure DoReslicing(horizontal:boolean);
  549. var
  550.   stack1,stack2,width,height:integer;
  551.   RoiLeft,RoiTop,RoiWidth,RoiHeight,max:integer;
  552.   InputSpacing,OutputSpacing,loc:real;
  553.   FirstTime:boolean;
  554. begin
  555.   RequiresVersion(1.45);
  556.   CheckForStack;
  557.   CheckForSelection;
  558.   SaveState;
  559.   SetBackground(0);
  560.   SetBackground(255);
  561.   stack1:=PicNumber;
  562.   InputSpacing:=GetSliceSpacing;
  563.   if InputSpacing<=0 then InputSpacing:=1;
  564.   InputSpacing:=GetNumber('Input Slice Spacing(Pixels):',InputSpacing);
  565.   SetSliceSpacing(InputSpacing);
  566.   OutputSpacing:=InputSpacing);
  567.   OutputSpacing:=GetNumber('Output Slice Spacing(Pixels):',OutputSpacing));
  568.   FirstTime:=true;
  569.   GetRoi(RoiLeft,RoiTop,RoiWidth,RoiHeight);
  570.   if horizontal then begin
  571.     loc:=RoiTop+OutputSpacing;
  572.     max:=RoiTop+RoiHeight;
  573.   end else begin
  574.     loc:=RoiLeft+OutputSpacing;
  575.     max:=RoiLeft+RoiWidth;
  576.   end;
  577.   while loc<max do begin
  578.     ChoosePic(stack1);
  579.     if horizontal
  580.       then MakeLineRoi(RoiLeft,loc,RoiLeft+RoiWidth,loc)
  581.       else MakeLineRoi(loc,RoiTop,loc,RoiTop+RoiHeight);
  582.     Reslice;
  583.     SelectAll;
  584.     Copy;
  585.     GetPicSize(width,height);
  586.     Dispose;
  587.     if FirstTime then begin
  588.       SetNewSize(width,height);
  589.       MakeNewStack(OutputSpacing:1:2);
  590.       SetSliceSpacing(OutputSpacing);
  591.       stack2:=PicNumber;
  592.     end;
  593.     ChoosePic(stack2);
  594.     if not FirstTime then AddSlice;
  595.     Paste;
  596.     loc:=loc+OutputSpacing;
  597.     FirstTime:=false;
  598.   end;
  599.   SelectPic(stack1);
  600.   KillRoi;
  601.   SelectPic(stack2);
  602.   KillRoi;
  603.   RestoreState;
  604. end;
  605.  
  606.  
  607. macro 'Reslice Horizontally…'; begin DoReslicing(true) end;
  608. macro 'Reslice Vertically…';   begin DoReslicing(false) end;
  609.  
  610.  
  611. macro '(-' begin end;
  612.  
  613.  
  614. procedure ResliceSignaMRI(horizontal,OptionKey:boolean);
  615. var
  616.   stack1,stack2,width,height:integer;
  617.   RoiLeft,RoiTop,RoiWidth,RoiHeight,max:integer;
  618.   loc,PixelSpacing:real;
  619.   InputSpacing,OutputSpacing:real; {mm}
  620.   scale:real; {pixels/mm}  
  621.   FirstTime:boolean;
  622. begin
  623.   scale:=1.0666; {Assumes 256x256 slices and 240mm field of view}
  624.   RequiresVersion(1.45);
  625.   CheckForStack;
  626.   CheckForSelection;
  627.   SaveState;
  628.   SetScale(scale,'mm');
  629.   SetBackground(0);
  630.   SetBackground(255);
  631.   stack1:=PicNumber;
  632.   InputSpacing:=GetSliceSpacing/scale;
  633.   if InputSpacing<=0 then InputSpacing:=1.5;
  634.   InputSpacing:=GetNumber('Input Slice Spacing(mm):',InputSpacing);
  635.   SetSliceSpacing(InputSpacing*scale);
  636.   OutputSpacing:=InputSpacing);
  637.   OutputSpacing:=GetNumber('Output Slice Spacing(mm):',OutputSpacing));
  638.   PixelSpacing:=OutputSpacing*scale;
  639.   FirstTime:=true;
  640.   GetRoi(RoiLeft,RoiTop,RoiWidth,RoiHeight);
  641.   if horizontal then begin
  642.     loc:=RoiTop+PixelSpacing;
  643.     max:=RoiTop+RoiHeight;
  644.   end else begin
  645.     loc:=RoiLeft+PixelSpacing;
  646.     max:=RoiLeft+RoiWidth;
  647.   end;
  648.   while loc<max do begin
  649.     ChoosePic(stack1);
  650.     if horizontal
  651.       then MakeLineRoi(RoiLeft,loc,RoiLeft+RoiWidth,loc)
  652.       else MakeLineRoi(loc,RoiTop,loc,RoiTop+RoiTop+RoiHeight);
  653.     if OptionKey then SetOption;
  654.     Reslice;
  655.     SelectAll;
  656.     Copy;
  657.     GetPicSize(width,height);
  658.     Dispose;
  659.     if FirstTime then begin
  660.       SetNewSize(width,height);
  661.       MakeNewStack(OutputSpacing:1:2);
  662.       SetSliceSpacing(PixelSpacing);
  663.       stack2:=PicNumber;
  664.     end;
  665.     ChoosePic(stack2);
  666.     if not FirstTime then AddSlice;
  667.     Paste;
  668.     loc:=loc+PixelSpacing;
  669.     FirstTime:=false;
  670.   end;
  671.   SelectPic(stack1);
  672.   KillRoi;
  673.   SelectPic(stack2);
  674.   KillRoi;
  675.   RestoreState;
  676. end;
  677.  
  678.  
  679. macro 'Import GE Signa Files…';
  680. Var
  681.   i,n,max,stack,first:integer;
  682.   scale:real; {pixels/mm}
  683. begin
  684.   scale:=1.066666; {assumes 256x256 slices with 240mm field of view}
  685.   first:=round(GetNumber('Number of first slice:',1));
  686.   max:=round(GetNumber('Maximum pixel value:',255));
  687.   SetNewSize(256,256);
  688.   MakeNewStack('Stack');
  689.   stack:=nPics;
  690.   MoveWindow(340,40);
  691.   SetScale(scale,'mm');
  692.   SetCustom(256,256,14336);
  693.   SetImport('Custom; 16-bits Signed; Fixed Scale');
  694.   SetImportMinMax(0,max);
  695.   n:=first;
  696.   for i:=1 to 256 do begin
  697.     Import('i.',n:3);
  698.     SetPicName('i.',n:3);
  699.     SelectAll;
  700.     Copy;
  701.     Dispose;
  702.     SelectPic(stack);
  703.     if n<>first then AddSlice;
  704.     n:=n+1;
  705.     Paste;
  706.    end;
  707. end;
  708.  
  709.  
  710. macro 'Sagitals to Coronals…'; begin ResliceSignaMRI(false,true) end;
  711.  
  712. macro 'Sagitals to Axials…'; begin ResliceSignaMRI(true,true) end;
  713.  
  714. macro 'Coronals to Sagitals…'; begin ResliceSignaMRI(false,true) end;
  715.  
  716.  
  717.